home *** CD-ROM | disk | FTP | other *** search
/ Trouble & Attitude 4 / Trouble and Attitude - Issue 04.iso / mac / DATA / MOVIES / COMMON.Cxt / 00078_Field_Chapter First Page Script SAMPLE.txt < prev    next >
Text File  |  1997-01-14  |  4KB  |  149 lines

  1.  
  2. --
  3. -- PORTFOLIO multipart chapter script
  4. -- "intro" page script
  5. -- initialization and introduction
  6. --
  7.  
  8. on enterFrame
  9.   
  10.   global gMovieName, gMovie, gSoloMode
  11.   global gNextIcon, gPreIcon, gBackIcon, gControlIcon, gIndexIcon, gFirstIcon
  12.   global gC1Button1, gC1Button2, gC1Button3
  13.   global gLocalSound
  14.   global gMusicOn, gCaptionOn
  15.   global gCurPath, gNavMode
  16.   global gControlPanel, gHotText
  17.   global gMap1Icon, gMap2Icon
  18.   
  19.   -- Set up globals for this section 
  20.   
  21.   set gNavMode = "chapter"
  22.   
  23.   -- make sure the control panel is current in every way
  24.   
  25.   if objectP(gControlPanel) then
  26.     tell window "Control Panel"
  27.       setIconStatus "music", gMusicOn
  28.       setIconStatus "caption", gCaptionOn
  29.     end tell
  30.   end if
  31.   
  32.   -- Set up the sprite/channel relationship for this section 
  33.   
  34.   -- Chapter Sprites
  35.   
  36.   set gC1Button1 = 5
  37.   set gC1Button2 = 6
  38.   set gC1Button3 = 7
  39.   set gFirstIcon = 8
  40.   
  41.   -- these are set in the intro: gControlIcon, gNextIcon, gPreIcon, gHotText
  42.   
  43.   if voidP("gLocalSound") then
  44.     set gLocalSound = FALSE
  45.   else
  46.     set gLocalSound = FALSE
  47.   end if
  48.   
  49.   --puppetsprite gIndexIcon TRUE
  50.   --puppetsprite gControlIcon TRUE
  51.   puppetsprite gC1Button1 TRUE
  52.   puppetsprite gC1Button2 TRUE
  53.   puppetsprite gC1Button3 TRUE
  54.   puppetsprite gFirstIcon TRUE
  55.   set the member of sprite gC1Button1 to member "chapter1-button1-icon"
  56.   set the member of sprite gC1Button2 to member "chapter1-button2-icon"
  57.   set the member of sprite gC1Button3 to member "chapter1-button3-icon"
  58.   set the member of sprite gControlIcon to member "control-icon"
  59.   set the member of sprite gFirstIcon to member "first-icon"
  60.   
  61.   if rollOver(gC1Button1) then
  62.     set the member of sprite gC1Button1 to member "chapter1-button1-icon-hot"
  63.     set the text of member "Message Text" to  "Black & White Series..."
  64.   else if rollOver(gC1Button2) then
  65.     set the member of sprite gC1Button2 to member "chapter1-button2-icon-hot"
  66.     set the text of member "Message Text" to  "Mud Series..."
  67.   else if rollOver(gC1Button3) then
  68.     set the member of sprite gC1Button3 to member "chapter1-button3-icon-hot"
  69.     set the text of member "Message Text" to  "Israel Series..."
  70.   else if rollOver(gControlIcon) then
  71.     set the member of sprite gControlIcon to member "control-icon-hot"
  72.     set the text of member "Message Text" to  "Reveal the control panel"
  73.   else if rollOver(gFirstIcon) then
  74.     set the member of sprite gFirstIcon to member "first-icon-hot"
  75.     set the text of member "Message Text" to  "Return to the first page of this section..."
  76.   else
  77.     set the text of member "Message Text" to  "Click on one of the names..."
  78.   end if
  79.   
  80.   dontPassEvent
  81.   
  82. end enterFrame
  83.  
  84. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  85.  
  86. on exitFrame 
  87.   
  88.   global gMovieName, gMovie, gSoloMode
  89.   global gNextIcon, gPreIcon, gBackIcon, gIndexIcon, gFirstIcon
  90.   global gButton1, gButton2, gButton3
  91.   global gTest
  92.   
  93.   if gSoloMode = FALSE then 
  94.     keepmusic
  95.   end if
  96.   
  97.   set gTest = 1
  98.   go to the frame 
  99.   
  100.   dontPassEvent
  101.   
  102. end exitFrame
  103.  
  104. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  105.  
  106. on MouseUp
  107.   
  108.   global gMovieName, gMovie, gSoloMode
  109.   global gNextIcon, gPreIcon, gBackIcon, gIndexIcon, gFirstIcon, gControlIcon
  110.   global gC1Button1, gC1Button2, gC1Button3
  111.   
  112.   set destination = "*"
  113.   
  114.   if the ClickOn = gC1Button1 then
  115.     set destination = "C1P1"
  116.   end if
  117.   
  118.   if the ClickOn = gC1Button2 then
  119.     set destination =  "C1P2"
  120.   end if
  121.   
  122.   if the ClickOn = gC1Button3 then
  123.     set destination =  "C1P3"
  124.   end if
  125.   
  126.   if the ClickOn = gFIrstIcon then
  127.     set destination = "first"
  128.   end if
  129.   
  130.   if the ClickOn = gControlIcon then
  131.     openControlPanel
  132.   end if
  133.   
  134.   
  135.   if destination <> "*" then
  136.     puppetsprite gC1Button1 FALSE
  137.     puppetsprite gC1Button2 FALSE
  138.     puppetsprite gC1Button3 FALSE
  139.     puppetsprite gFirstIcon FALSE
  140.     if destination = "first" then
  141.       go to frame "intro" 
  142.     else
  143.       go to frame destination
  144.     end if
  145.   else
  146.     -- alert "Internal Error: I don't know where to go." -- we can't get here!
  147.   end if
  148.   
  149. end MouseUp